﻿<Page x:Class="JasRibbonApplicatie.Views.MateriaalOmschrijving"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:conv="clr-namespace:JasRibbonApplicatie.Converters"
      xmlns:ex="clr-namespace:Smith.WPF.HtmlEditor;assembly=Smith.WPF.HtmlEditor"
      mc:Ignorable="d" 
      d:DesignHeight="800" d:DesignWidth="800"
	Title="Omschrijving" xmlns:my="clr-namespace:JasRibbonApplicatie">
    <ScrollViewer>
        <Grid HorizontalAlignment="Stretch" Margin="12" Name="detailsGrid" VerticalAlignment="Top">
            <Grid.Resources>
                <conv:SourceListConverter x:Key="sourceListConverter"/>
            </Grid.Resources>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Label   Grid.Column="0" Grid.Row="0" Content="Naam:" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="naamTextBox" Text="{Binding Path=naam, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Image   Grid.Column="2" Grid.RowSpan="5" Height="156" Width="250" HorizontalAlignment="Right" Margin="3" Name="productImage" Stretch="Uniform" VerticalAlignment="Top"  />
            <Label   Grid.Column="0" Grid.Row="1" Content="Korte naam:" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="korte_naamTextBox" Text="{Binding Path=korte_naam, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Label   Grid.Column="0" Grid.Row="2" Content="Dagprijs:"  HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="dagprijsTextBox" Text="{Binding Path=dagprijs, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Label   Grid.Column="0" Grid.Row="3" Content="Waarborg:"  HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="waarborgTextBox" Text="{Binding Path=waarborg, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Label   Grid.Column="0" Grid.Row="4" Content="Waarborg Extra Stuks:"  HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="waarborgExtraStuksTextBox" Text="{Binding Path=waarborgExtraStuks, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Label   Grid.Column="0" Grid.Row="5" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Top" Content="Omschrijving:"/>
            <TextBox Grid.Column="1" Grid.Row="5" HorizontalAlignment="Stretch" Margin="3" Name="omschrijvingHtmlEditor" Text="{Binding Path=omschrijving, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" Height="200" AcceptsReturn="True" AcceptsTab="True" />
            <Grid Grid.Column="2" Grid.Row="5">
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.5*"/>
                    <RowDefinition Height="28"/>
                    <RowDefinition Height="0.5*"/>
                    <RowDefinition Height="28"/>
                </Grid.RowDefinitions>
                <ListBox Grid.Row="0" Width="250" HorizontalAlignment="Left" Margin="3" Name="afbeeldingListBox" VerticalAlignment="Stretch" ItemsSource="{Binding Path=afbeelding, Mode=TwoWay, Converter={StaticResource sourceListConverter}}" SelectionChanged="afbeeldingListBox_SelectionChanged" />
                <StackPanel Grid.Row="1" Orientation="Horizontal" Height="28">
                    <Button Content="Toevoegen.." Margin="3" Name="addafbeeldingButton" Click="addafbeeldingButton_Click" />
                    <Button Content="Verwijderen" Margin="3" Name="deleteafbeeldingButton" />
                    <ProgressBar Height="18" Name="uploadProgressBar" Visibility="Collapsed" Width="66" />
                    <Label Content="" Height="24" Name="vooruitgangLabel" Visibility="Collapsed" Width="38" />
                </StackPanel>
                <ListBox Grid.Row="2" Width="250" HorizontalAlignment="Left" Margin="3" Name="fileListBox" VerticalAlignment="Stretch" ItemsSource="{Binding Path=file, Mode=TwoWay, Converter={StaticResource sourceListConverter}}" />
                <StackPanel Grid.Row="3" Orientation="Horizontal" Height="28">
                    <Button Content="Toevoegen.." Margin="3" Name="addfileButton" />
                    <Button Content="Verwijderen" Margin="3" Name="deletefileButton" />
                </StackPanel>
            </Grid>
            <Label  Grid.Column="0" Grid.Row="6" Content="materiaal:" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <DataGrid Grid.Column="1" Grid.Row="6" Margin="3" Name="materiaalDatagrid" VerticalAlignment="Stretch" ItemsSource="{Binding materiaal}" AutoGenerateColumns="False" CanUserAddRows="False">
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding streepjescode}" Header="Streepjescode" IsReadOnly="True"/>
                    <DataGridCheckBoxColumn Binding="{Binding defect}" Header="Defect" />
                    <DataGridCheckBoxColumn Binding="{Binding ontleenbaar}" Header="Ontleenbaar" />
                    <DataGridTemplateColumn Header="Verwijder">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button x:Name="deleteButton" Click="deleteButton_Click">
                                    <Image Source="/JasRibbonApplicatie;component/Images/AanvraagBeheerIcons/big/recycleBinFull.png" Height="24" Width="24" />
                                </Button>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>
                </DataGrid.Columns>
            </DataGrid>
            <Label  Grid.Column="0" Grid.Row="7" Content="toebehoren:" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <ListBox Grid.Column="1" Grid.Row="7" Margin="3" Name="toebehorenListbox" VerticalAlignment="Stretch" ItemsSource="{Binding ToebehorenTypes}" DisplayMemberPath="naam"/>
            <Label   Grid.Column="0" Grid.Row="10" Content="afbeelding:" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="10" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="afbeeldingTextBox" Text="{Binding Path=afbeelding, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Label   Grid.Column="0" Grid.Row="11" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" Content="file:"/>
            <TextBox Grid.Column="1" Grid.Row="11" Height="23" HorizontalAlignment="Stretch" Margin="3" Name="fileTextBox" Text="{Binding Path=file, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" />
            <Button  Grid.Column="2" Grid.Row="9" Content="Opslaan..." Name="saveButton" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="3" Click="saveButton_Click" />
        </Grid>
    </ScrollViewer>
</Page>
